package com.xian.im.message.event;

import com.alibaba.fastjson.JSONObject;
import com.xian.im.common.enums.ConsumerQueueEnum;
import com.xian.im.common.event.group.model.GroupEvent;
import com.xian.im.common.utils.template.RabbitTemplateUtil;

/**
 * @program: gitee
 * @description:
 * @author: liru.xian
 * @create: 2021-08-27 21:34
 **/
public abstract class AbsEventListenner {


    /**
     * @param event
     */
    public void createEvent(Object event) {
        RabbitTemplateUtil.sendMes(queueEvent().getExchange(), JSONObject.toJSONString(event));
    }

    abstract ConsumerQueueEnum queueEvent();
}
